﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace ImTag.Silverlight
{
    public class TagsManager
    {
        public static void LoadTags()
        {
            var service = new ImTagService.ImTagServiceSoapClient();
            service.LoadTagsCompleted += (source2, ev2) =>
            {
                if (ev2.Result != null)
                {
                    AvailableTags = ev2.Result.ToArray();
                    MainPage.Current.SearchBar.AvailableTags = AvailableTags;
                }
            };
            service.LoadTagsAsync();
        }
        public static string[] AvailableTags
        {
            set;
            get;
        }
    }
}
